{extend name="layout"}
{block name="title"}编辑减员{/block}
{block name="body"}
<div class="content">
    <form class="mainForm" data-auto="false"  data-callback="submitCallback">

        <div class="item-box">
            <div class="item-title">
                员工信息
            </div>
            <div class="item-form">
                <div class="item-row">
                    <span class="label-required-prev">员工姓名：</span>
                    <div>
                        <input type="text" name="name"  required placeholder="请输入姓名" autocomplete="off" value="{$increase.name|default=""}" readonly>
                    </div>
                </div>
                <div class="item-row">
                    <span>身份证号：</span>
                    <div>
                        <input type="text" name="id_number" required placeholder="请输入身份证号" autocomplete="off"   value="{$increase.id_number|default=""}" readonly>
                    </div>
                </div>
                <div class="item-row">
                    <span>电话号码：</span>
                    <div>
                        <input type="number" name="mobile" required placeholder="请输入电话号码" autocomplete="off"  value="{$increase.mobile|default=""}" readonly>
                    </div>
                </div>
                <div class="item-row">
                    <span>截止日期：</span>
                    <div>

                        <input readonly class="endDate" data-date-input=""  name="end_date" required placeholder="请选择截止日期" value="{$downsizing.end_date|default=""}" autocomplete="off" value="">
                    </div>
                </div>

            </div>
        </div>

        <div class="item-box insurance_type">
            <div class="item-title">
                保险信息
            </div>

			{notempty name='list'}
            {foreach $list as $key=>$vo}
            <div class="item-form insurance-box">
                <div class="item-form-title">
                    <span class="label-required-prev">
                    	{foreach $insurances as $k=>$v}
                            {if  $vo.insurance eq $k}
                            {$v}
                            {/if}
                        {/foreach}
                    </span>
                </div>
                <div class="item-row">
                    <span class="label-required-prev">截止日期：</span>
                    <div>

                        <input readonly class="endDate"  data-date-input=""   name="insurance_end_date[]" placeholder="请选择"  value="{$vo.end_date|default=""}"  >
                    </div>
                </div>
                <div class="item-row item-textarea">
                    <span class="label-required-prev">备注信息：</span>

                    <textarea type="text" name="insurance_desc[]"  rows="3">{$vo.desc|default=""}</textarea>

                    <input type="hidden" name="insurance[]" value="{$vo.insurance}"  />
                </div>

            </div>
			{/foreach}
			{/notempty}	

            
		<input type='hidden' value='{$downsizing.id}' name='id'>
        </div>
        <div class="button-box">
            <a class="add-updata" onclick="$('form').submit()">提交审核</a>

        </div>
    </form>

</div>


{/block}
{block name="script"}
<!--<script>-->
<!--	$(function (){-->
<!--		var docmHeight= document.documentElement.clientHeight ||document.body.clientHeight,-->
<!--			showHeight= document.documentElement.clientHeight ||document.body.clientHeight-->
<!--		// var Height = $('body').height();-->
<!--		// console.log(docmHeight -80,showHeight)-->
<!--		// 回到顶部-->
<!--		$(window).resize(function () {-->
<!--			// 回到顶部-->
<!--			showHeight= document.documentElement.clientHeight ||document.body.clientHeight-->
<!--			// console.log(showHeight)-->
<!--			if((docmHeight - 100)> showHeight){-->
<!--				//隐藏-->
<!--				$(".button-box").hide()-->
<!--			}else{-->
<!--				//显示-->
<!--				$(".button-box").show()-->
<!--			}-->
<!--		});-->
<!--	})-->
<!--</script>-->
<script>
	$(function () {

		$("[name='end_date']").change(function(){
			// $("[name^='insurance_end_date']").val($(this).val())

			var  val=$(this).val();
			$("[name^='insurance_end_date']").each(function(){
				var dataType=$(this).attr("data-type");
				$(this).val(val)
			})

		})
	})
</script>


{/block}
{block name="style"}

{/block}


